﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Devfw.OpenAuth
{
    /// <summary>
    /// Provides a predefined set of algorithms that are supported officially by the protocol
    /// </summary>
    public enum SignatureType
    {
        HMACSHA1,
        PLAINTEXT,
        // RSASHA1
    }

    public static class SignatureTypeExtension
    {
        public static string AdapterToString( this SignatureType type )
        {
            switch( type )
            {
                case SignatureType.HMACSHA1:
                    return "HMAC-SHA1";
                // case SignatureTypes.RSASHA1:
                //    return "RSA-SHA1";
                case SignatureType.PLAINTEXT:
                default:
                    return "PLAINTEXT";
            }
        }
    }

}
